package com.itheima.oopadvanced.api_bigdecimal;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * @author Anomaly
 * @date 2022/12/29 15:49
 */
public class Test {
    public static void main(String[] args) {
        System.out.println(0.1 + 0.2);
        BigDecimal bigDecimal = BigDecimal.valueOf(0.1);
        BigDecimal bigDecimal2 = BigDecimal.valueOf(0.2);
        BigDecimal add = bigDecimal.add(bigDecimal2);
        double rs = add.doubleValue();
        System.out.println(rs);
    }
}
